package com.ruoyi.system.webgroupservcie.impl;

import com.ruoyi.system.domain.webgroup.ClockCount;
import com.ruoyi.system.mapper.webgroupmapper.ClockCountMapper;
import com.ruoyi.system.webgroupservcie.ClockCountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;

/**
 * 统计打卡时间表的service实现类
 */
@Service
@Transactional
public class ClockCountServiceImpl implements ClockCountService {
    @Autowired
    private ClockCountMapper clockCountMapper;

    //查询所有记录
    @Override
    public List<ClockCount> getClockCountAll(ClockCount clockCount) {
        return clockCountMapper.getClockCountAll(clockCount);
    }
    //根据id查询
    @Override
    public ClockCount getClockCountById(Integer clockCountId) {
        return clockCountMapper.getClockCountById(clockCountId);
    }

    //删
    @Override
    public void deleteClockCountById(Integer clockCountId) {
        clockCountMapper.deleteClockCountById(clockCountId);
    }

    //增
    @Override
    public void postClockCountById(ClockCount clockCount) {
        clockCountMapper.postClockCountById(clockCount);
    }

    @Override
    public void putClockCountById(ClockCount clockCount) {
        clockCountMapper.putClockCountById(clockCount);
    }

    @Override
    public List<ClockCount> dailyRankingEdition(Date date) {
        return clockCountMapper.dailyRankingEdition(date);
    }
}
